package com.zhao.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zhao.dao.inf.UserDao;
import com.zhao.entity.User;

@Service("userService")
public class UserService {

	@Autowired
	private UserDao userDao;
	/**
	 * 用户登录
	 * @param username
	 * @param password
	 * @return
	 */
	public User userLogin(User user) {
		
		return userDao.userLogin(user);
	}
	/**
	 * 修改密码
	 * @param encrpt
	 */
	@Transactional
	public void changePassword(User user, String encrpt) {
		userDao.changePassword(user, encrpt);
	}
	
}
